{extend name='layout'}
{block name='body'}
{Ke:seturl name='edit,send'}
<div class="row">
	<div class="title">模板消息管理</div>
</div>
<div class="margin-li">

  <!-- 筛选框 start -->
  <el-form :inline="true" :model="search" size="mini">


    <el-form-item label="搜索">
      <el-input v-model="search.key" @keyup.enter.native="onSearch" placeholder="模板ID/模板名称"></el-input>
    </el-form-item>

    <el-form-item>
      <el-button type="primary" @click="onSearch">筛选</el-button>
    </el-form-item>
  </el-form>
  <!-- 筛选框 end -->


  <el-table
    v-loading="loadList"
    :data="list"
    border
    stripe>
    <el-table-column prop="id" label="模板ID">
      <template slot-scope="item">
        <a @click="tabInput(item)" v-if="item.row._showinput == null">{{ item.row.id }}</a>
        <el-input v-else size="mini" v-model="showInput"
          v-focus="focusState"
          @keyup.enter.native="inputComplete(item)"
          @keyup.esc.native="inputComplete(item,false)"
          @blur="inputComplete(item)"></el-input>
      </template>
  	</el-table-column>
    <el-table-column prop="name" label="模板">
    	</el-table-column>
    <el-table-column prop="type" label="类型" width="150" align="center">
      </el-table-column>
    <el-table-column label="操作" width="120" align="center">
      <template slot-scope="item">
        <el-button type="text" @click="maps('send',{type:item.row.type})">测试</el-button>
      </template>
      </el-table-column>

  </el-table>


  <!-- 分页 start -->
  <div class="block">
    <el-pagination
      layout="sizes, total, prev, pager, next, jumper"
      :page-sizes="[10, 20, 50, 100]"
      :page-size="size"
      :total="total"
      @size-change="tabSize"
      @current-change="loadLists">
    </el-pagination>
  </div>
  <!-- 分页 end -->
</div>
{/block}